Custom sounds

 

To play your custom sounds in the game you must write

the following declaration in the description.ext file:

 

class CfgSounds
{
          tracks[]=
          {
               track,track2
          };


          class track
          {
               name = "trackname";
               sound[] = {\sound\trackname.ogg, db+10, 1.0};
          };


          class track2
          {
               name = "trackname2";
               sound[] = {\music\trackname2.ogg, db+10, 1.0};
          };
};

 

track,track2 is the declaration of the sounds you want to put in.

class track The first track will declarate here.

sound is the folder where the sound are.

trackname is the name of the soundfile

db+10 is for the loudness

 

Now to play the sound in the game use this command:

 

Jack say "trackname";

 

trackname is one of the sounds you declarate in the script befor.